Factory Method Design Pattern in C